package cn.tju.yanbo.setting;


import cn.tju.yanbo.commons.BaseActivity;
import cn.tju.yanbo.commons.CalendarGestureListener;
import cn.tju.yanbo.commons.SettingViewListener;

import cn.tju.yanbo.R;
import cn.tju.yanbo.calendar.LunarCalendarActivity;
import cn.tju.yanbo.datechoose.DateChooseActivity;
import cn.tju.yanbo.goodoccasion.GoodOccasionActivity;
import cn.tju.yanbo.homepage.HomepageActivity;
import cn.tju.yanbo.luckyday.LuckyDayActivity;
import cn.tju.yanbo.utils.AppUtils;

import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;

public class SettingActivity extends BaseActivity {
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.setting);
        
        this.initActivity(savedInstanceState);
        View view = findViewById(R.id.main_content_view);
        view.setOnTouchListener(new SettingViewListener(this));
    }

    @Override
    protected void registerIntent() {
        registerIntent(R.id.menu_lunar_calendar, LunarCalendarActivity.class);
        registerIntent(R.id.menu_datechoose, DateChooseActivity.class);
        registerIntent(R.id.menu_good_occasion, GoodOccasionActivity.class);
        registerIntent(R.id.menu_lucky_day, LuckyDayActivity.class);
        registerIntent(R.id.menu_homepage, HomepageActivity.class);
    }

    @Override
    protected boolean hasDateView() {
        return false;
    }

    @Override
    protected Class<?> leftActivity() {
        return LuckyDayActivity.class;
    }

    @Override
    protected Class<?> rightActivity() {
        return HomepageActivity.class;
    }
    
    @Override
    protected Drawable background() {
        return CACHED_PICTURES.get(R.drawable.setting);
    }
    
    @Override
    public Point center() {
        return new Point(AppUtils.SCREEN_METRICS.widthPixels/2, AppUtils.SCREEN_METRICS.heightPixels/2);
    }
}
